package com.study.bean;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.*;

import java.io.Serializable;

@ConfigurationProperties(prefix = "sys.config.pic")//次注解要配合 EnableConfigurationProperties 使用，
@Component
@Data
public class Pic implements Serializable {

    private String baseurl;
    private String savepath;


    public String showPic() {
        System.out.println(baseurl);
        System.out.println(savepath);
        return String.format("%s01.jpg", baseurl);
    }

}
